<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    {$LOAD_STYLE.top|raw}
</head>
<style>
	.zi{
		font-size: 18px !important;
	}
</style>
	<body class="pear-container">
		
		<div class="layui-card">
			<div class="layui-card-body">
				<table id="dataTable" lay-filter="dataTable"></table>
			</div>
		</div>
		
        <script type="text/html" id="toolbar">
			产品报价表
        </script>

		<script type="text/html" id="options">
		<div class="layui-options">
			<button class="pear-btn pear-btn-primary pear-btn-sm" lay-event="edit"><i class="layui-icon layui-icon-edit"></i></button>
			<button class="pear-btn pear-btn-warming pear-btn-sm" lay-event="color"><i class="layui-icon layui-icon-theme"></i></button>
		    <button class="pear-btn pear-btn-danger pear-btn-sm" lay-event="remove"><i class="layui-icon layui-icon-delete"></i></button>
		</div>
		</script>
		
        <script>
        layui.use(['table', 'form', 'jquery','common','laydate','topBar','mycomm'], function() {
            let table = layui.table;
            let form = layui.form;
            let $ = layui.jquery;
            let common = layui.common;
			let mycomm = layui.mycomm;
            let laydate = layui.laydate;
            let MODULE_PATH = "{$MODULE_PATH}";
            
            let cols = [
                [
					{
					  field: "type",
					  title: "分类名",
					  width: 100,
					  unresize: "true",
					  align: "center",
					},{
				      field: "number",
				      title: "编号",
					  width: 80,
				      unresize: "true",
				      align: "center",
				   }, {
                       field: "title",
                       title: "品名",
					   width: 200,
                       unresize: "true",
                       align: "left",
                   }, {
                       field: "kgy",
                       title: "KG/Y",
					   width: 80,
                       unresize: "true",
                       align: "center"  
                   }, {
                       field: "kgm",
                       title: "KG/M",
					   width: 80,
                       unresize: "true",
                       align: "center",
				   }, {
				       field: "breadth",
				       title: "幅宽",
					   width: 80,
					   templet: "<div>{{d.breadth}}cm</div>",
				       unresize: "true",
				       align: "center"
				   }, {
				       field: "square",
				       title: "克重",
					   width: 100,
					   templet: "<div>{{d.square}}g</div>",
				       unresize: "true",
				       align: "center",
					}, {
						field: "price4",
						title: "米价",
						width: 80,
						unresize: "true",
						align: "center"
					}, {
						field: "price1",
						title: "杂色",
						width: 80,
						edit: 'text',
						unresize: "true",
						align: "center",
					}, {
						field: "price2",
						title: "白色",
						width: 80,
						edit: 'text',
						unresize: "true",
						align: "center"
					}, {
						field: "tube",
						title: "纸管+空差",
						width: 100,
						templet: "<div>{{d.tube}} + {{d.emptykg}}</div>",
						unresize: "true",
						align: "center"
					}, {
					   field: "markup",
					   title: "备注",
					   unresize: "true",
					   align: "center"
					}, {
					   field: "component",
					   title: "成份",
					   width: 180,
					   unresize: "true",
					   align: "center"
				   }, {
					   field: "sort",
					   title: "排序",
					   width: 80,
					   unresize: "true",
					   align: "center"
				   }
                ]
            ]
			
			mycomm.tableSetVal(MODULE_PATH);
			
			table.render({
				elem: '#dataTable',
				url: MODULE_PATH + 'table',
				page: true,
				cols: cols,
				cellMinWidth: 100,
				even:true,
				limit:1000,
				title:"产品报价表 ({$today})",
				toolbar: '#toolbar',
				defaultToolbar: [{
					title: '刷新',
					layEvent: 'refresh',
					icon: 'layui-icon-refresh',
				}, 'filter', 'print', 'exports']
			});
			
        })		
    </script>
	{$LOAD_STYLE.bottom|raw}
	</body>
</html>
